package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.base.query.PaymentScheduleQueryObject;
import cn.wolfcode.p2p.business.domain.BidRequest;
import cn.wolfcode.p2p.business.domain.PaymentSchedule;
import cn.wolfcode.p2p.util.PageResult;

import java.util.List;

public interface IPaymentScheduleService {
    /**
     * 借款对象
     * @param bidRequest
     */
    List<PaymentSchedule> loanPlan(BidRequest bidRequest);

    PageResult queryForPage(PaymentScheduleQueryObject qo);

    PaymentSchedule getPaymentSchedule(Long id);

    /**
     * 查询是否还清
     * @param bidRequestId
     * @param paymentStateDone
     * @return
     */
    int  listPaymentScheduleStatesByBidRequestId(Long bidRequestId, int paymentStateDone);

    void update(PaymentSchedule paymentSchedule);

    /**
     * 更新滞纳金
     * @param paymentSchedule
     */
    void updateLatePayment(PaymentSchedule paymentSchedule);


    List<PaymentSchedule> listPaymentScheduleByState(int state);
}
